package com.freesky.biz.activity.service.impl;

import com.freesky.biz.activity.domain.TActivityConfig;
import com.freesky.biz.activity.domain.TActivityConfigRules;
import com.freesky.biz.activity.mapper.ActivityConfigMapper;
import com.freesky.biz.activity.service.IActivityConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ActivityConfigServiceImpl implements IActivityConfigService {

    @Autowired
    private ActivityConfigMapper activityConfigMapper;

    @Override
    public TActivityConfig get(String id) {
        return activityConfigMapper.get(id);
    }

    @Override
    public List<TActivityConfig> findList(TActivityConfig entity) {
        return activityConfigMapper.findList(entity);
    }

    @Override
    public int insert(TActivityConfig entity) {
        return activityConfigMapper.insert(entity);
    }

    @Override
    public int update(TActivityConfig entity) {
        return activityConfigMapper.update(entity);
    }

    @Override
    public int deleteByIds(String[] ids){
        return activityConfigMapper.deleteByIds(ids);
    }

    @Override
    public int addActivityRules(TActivityConfigRules activityRulesModel) {
        return activityConfigMapper.addActivityRules(activityRulesModel);
    }

    @Override
    public int updateActivityRules(TActivityConfigRules activityRulesModel) {
        return activityConfigMapper.updateActivityRules(activityRulesModel);
    }

    @Override
    public TActivityConfigRules getActivityRulesById(String id) {
        return activityConfigMapper.getActivityRulesById(id);
    }

    @Override
    public List<TActivityConfigRules> getActivityRulesByActivityId(String activityId) {
        return activityConfigMapper.getActivityRulesByActivityId(activityId);
    }

    @Override
    public int deleteActivityRulesById(String id) {
        return activityConfigMapper.deleteActivityRulesById(id);
    }

}
